<template>
  <div class="nearby">
    <div class="nearby-title">附近店铺</div>
    <div class="nearby-item" v-for="(item,index) in nearbyList" :key="index">
      <img
        :src="item.imgUrl"
        class="nearby-item-img"
        alt=""
      />
      <div class="nearby-content">
        <div class="nearby-content-title">{{item.title}}</div>
        <div class="nearby-content-tags" >
          <span class="nearby-content-tag" v-for="(innerItem,innerIndex) in item.tags" :key="innerIndex">{{innerItem}}</span>
        </div>
        <p class="nearby-content-hightlight">
          {{item.desc}}
        </p>
      </div>
    </div>
    
  </div>
</template>

<script>
export default {
    name:"Nearby",
    setup(){
      const nearbyList=[{
        id:1,
        imgUrl:'http://www.dell-lee.com/imgs/vue3/near.png',
        title:'沃尔玛',
        tags:['月售1万+','起送¥0','基础运费¥5'],
        desc:' VIP尊享满89元减4元运费券（每月3张)'
      },{
        id:2,
        imgUrl:'http://www.dell-lee.com/imgs/vue3/near.png',
        title:'沃尔玛',
        tags:['月售1万+','起送¥0','基础运费¥5'],
        desc:' VIP尊享满89元减4元运费券（每月3张)'
      }];
      return {nearbyList};
    }
};
</script>

<style lang="scss" scoped>
@import "../../assets/style/viriables.scss";
@import "../../assets/style/mixins.scss";
.nearby {
  &-title {
    margin: 0.16rem 0 0.02rem 0;
    font-size: 0.18rem;
    font-weight: normal;
    color: $content-fontcolor;
  }
  &-item {
    display: flex;
    padding-top: 0.12rem;
    &-img {
      margin-right: 0.16rem;
      width: 0.56rem;
      height: 0.56rem;
    }
  }
  &-content {
    flex: 1;
    padding-bottom: 0.12rem;
    border-bottom: 1px solid $content-bgColor;
    &-title {
      line-height: 0.22rem;
      font-size: 0.16rem;
      color: $content-fontcolor;
    }
    &-tags {
      margin-top: 0.08rem;
      line-height: 0.18rem;
      font-size: 0.13rem;
      color: $content-fontcolor;
    }
    &-tag {
      margin-right: 0.16rem;
    }
    &-hightlight {
      margin-top: 0.08rem 0 0 0;
      line-height: 0.18rem;
      font-size: 0.13rem;
      color: #e93b3b;
    }
  }
}
</style>